lmfit <- lm(mpg~wt,data = mtcars)

print(lmfit)

plot(lmfit)

summary(lmfit)

print(mtcars)

lmfit2 <- lm(mpg~drat,data = mtcars)
summary(lmfit2)
plot(lmfit2)
plot(cook)

?lm

y <- matrix(c(1:6),nrow=2,ncol=2)
print(y)
cells <- c(1,26,24,68)
rnames <- c("R1","R2")
cnames <- c("C1","C2")
mymatrix <- matrix(cells,nrow = 2,ncol = 2,byrow = FALSE
                   , dimnames = list(rnames,cnames))

print(mymatrix * y)

#3 dimensions Array 
dim1 <- c("A1","A2")
dim2 <- c("B1","B2","B3","B4")
dim3 <- c("C1","C2","C3")

z<-array(1:24, c(2,4,3),dimnames = list(dim1,dim2,dim3))

print(all)



